package org.ykh.srb.core.service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.ykh.common.annotation.SyncTransactional;
import org.ykh.srb.core.pojo.entity.DictEntity;
import org.ykh.srb.core.mapper.DictMapper;

/**
 * @author ykh
 */

@Service
@Slf4j
public class SyncTestService {
    private final DictMapper dictMapper;

    public SyncTestService(DictMapper dictMapper) {this.dictMapper = dictMapper;}

    @SyncTransactional()
    public void testSync(){
        log.error("这个方法执行了");
        final DictEntity dictEntity = new DictEntity();
        dictEntity.setValue(4545);
        dictMapper.insert(dictEntity);
    }
}
